home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / bbbbs85.lha / rexx / bbsExtDL.baud < prev    next >
Text File  |  1995-01-22  |  18KB  |  660 lines

  1. /* $VERS: bbsExtDL.baud 8.4 (21.1.95)
  2. copyright 1992-95 Richard Lee Stockton
  3.         FREELY DISTRIBUTABLE
  4.  
  5. Allows BBBBS user to download from extra devices like CD drives.
  6. Keeps track of time left to this user, and watches for hangup.
  7.  
  8. Just ignores file or directory names that contain spaces
  9.  because BBBBS would be unable to download them anyway.
  10.  
  11. Ignores icons (files that end in .info).
  12.  
  13. A textfile in BBS:Lists, CD_Exclude, controls exclusion of
  14.  drawers on certain CDs that contain copyright files. Other
  15.  specific files or directories can be excluded by adding
  16.  their paths to the CD_Exclude textfile, one path per line.
  17.  
  18. Super-sysop may select very large directories and have their
  19.  formatted display lists cached as textfiles in bbspath'Cache'.
  20.  This can greatly improve access time for very large drawers,
  21.  especially if they contain sub-directories.
  22. */
  23.  
  24. SIGNAL ON BREAK_C
  25. SIGNAL ON BREAK_E
  26. PARSE ARG name level maxtime linesperpage colorflag devlist 
  27.  
  28. exclude=''
  29. bbspath=GETCLIP('BBS_path')
  30. x=OPEN(f,bbspath'Lists/CD_Exclude','R')
  31. IF x~=0 THEN exclude=READCH(f,65000)
  32. CALL CLOSE(f)
  33. exclude=UPPER(TRANSLATE(exclude,' ','0A'x))
  34.  
  35. lists.=''
  36. lists.0=0
  37. maxtime=maxtime-30
  38. CALL TIME('R')
  39. CR='0D'x
  40. def=''
  41. bak2=''
  42. pen3=''
  43. IF colorflag~=1 THEN
  44.   DO
  45.     def=''
  46.     bak2=''
  47.     pen3=''
  48.   END
  49. OPTIONS PROMPT 'Press RETURN'
  50. SAY CR
  51. x=OPEN(f,bbspath'BBS_TEXT/EXT_INFO','R')
  52. IF x=0 THEN SAY bbspath'BBS_TEXT/EXT_INFO failed to open!'CR
  53. ELSE
  54.   DO
  55.     DO i=1 WHILE ~EOF(f)
  56.       SAY READLN(f)||CR
  57.       IF (i+2)//linesperpage=0 THEN
  58.         DO
  59.           PULL junk
  60.           SAY '1B'x'M'||'1B'x'M'CR
  61.         END
  62.     END
  63.     CALL CLOSE(f)
  64.   END
  65. selected=''
  66. path=''
  67. templist=devlist
  68. devlist=''
  69. longest=0
  70. CALL PRAGMA('W','N')  /* disk requesters OFF */
  71. CALL PRAGMA('D',bbspath'Information')
  72. test3=PRAGMA('D')
  73. DO i=1 TO WORDS(templist)
  74.   test=WORD(templist,i)
  75.   IF ~EXISTS(test) THEN ITERATE i
  76.   IF SHOWLIST('A',UPPER(LEFT(test,LENGTH(test)-1))) THEN test2=test
  77.   ELSE
  78.     DO
  79.       CALL PRAGMA('D',test)
  80.       test2=PRAGMA('D')
  81.       IF test2=test3 THEN ITERATE i
  82.       IF WORDS(test2)>1 THEN test2=test
  83.     END
  84.   devlist=STRIP(devlist test2)
  85.   IF LENGTH(test2)>longest THEN longest=LENGTH(test2)
  86. END
  87. cols=76%(longest+8)
  88. IF devlist='' THEN
  89.   DO
  90.     SAY CR
  91.     SAY '*** Sorry, no External Devices are available! ***'CR
  92.     SAY CR
  93.     PULL junk
  94.     EXIT('')
  95.   END
  96.  
  97. picklist=devlist
  98. IF WORDS(picklist)=1 THEN
  99.   DO
  100.     path=picklist
  101.     IF RIGHT(path,1)~=':' THEN path=path'/'
  102.     picklist=makepicklist()
  103.   END
  104. ELSE
  105.   DO
  106.     lists.0=1
  107.     dirs=WORDS(devlist)
  108.   END
  109. CALL checkdcd()
  110.  
  111. OPTIONS PROMPT 'Press RETURN'
  112. PULL junk
  113.  
  114. DO loop=1
  115.   CALL checkdcd()
  116.   test=TIME('E')
  117.   IF test>(maxtime-100) THEN
  118.     DO
  119.       SAY CR
  120.       IF test>maxtime THEN
  121.         DO
  122.           SAY '*** This session''s time is expiring! ***'CR
  123.           SAY CR
  124.           LEAVE loop
  125.         END
  126.       ELSE SAY '*** Less than 2 minutes remaining! ***'CR
  127.       SAY CR
  128.     END
  129.   filename=pick(picklist)
  130.   IF filename='' THEN
  131.     DO
  132.       temp=path
  133.       IF RIGHT(temp,1)='/' THEN temp=LEFT(temp,LENGTH(temp)-1)
  134.       IF FIND(UPPER(devlist),UPPER(temp))>0 THEN
  135.         DO
  136.           IF WORDS(devlist)=1 THEN ITERATE loop
  137.           picklist=devlist
  138.           path=''
  139.           ITERATE loop
  140.         END
  141.       ELSE
  142.         DO
  143.           test=RIGHT(path,1)
  144.           IF test='/' THEN path=LEFT(path,LENGTH(path)-1)
  145.           slash=LASTPOS('/',path)
  146.           IF slash=0 THEN slash=LASTPOS(':',path)
  147.           path=LEFT(path,slash)
  148.         END
  149.     END
  150.   IF filename=':-)' THEN ITERATE loop
  151.   tempath=path||filename
  152.   temp=WORD(STATEF(tempath),1)
  153.   IF temp='FILE' THEN
  154.     DO
  155.       IF FIND(UPPER(selected),UPPER(tempath))=0 THEN
  156.         selected=selected tempath
  157.       ELSE selected=DELWORD(selected,FIND(UPPER(selected),UPPER(tempath)),1)
  158.       shosel=''
  159.       ITERATE loop
  160.     END
  161.   ELSE IF temp='DIR' THEN
  162.     DO
  163.       path=tempath
  164.       test=RIGHT(path,1)
  165.       IF test~='' & test~='/' & test~=':' THEN path=path'/'
  166.     END
  167.   ELSE IF UPPER(filename)='DONE' THEN LEAVE loop
  168.   IF path~='' THEN picklist=makepicklist()
  169. END
  170. selected=STRIP(selected)
  171. test=''
  172. IF WORDS(selected)=1 THEN test=UPPER(RIGHT(selected,4))
  173. IF selected~='' & test~='.LHA' & test~='.LZH' & test~='.DMS' & test~='.ZOO' THEN
  174.   DO
  175.     SAY CR
  176.     SAY 'You may choose to have your selection(s) archived using LhA.'CR
  177.     SAY 'This makes downloading faster, if the files are not already compressed.'CR
  178.     SAY 'The completed archive will be attached to email addressed to you.'CR
  179.     SAY CR
  180.     OPTIONS PROMPT 'Archive selected files? (nY) > '
  181.     PULL temp
  182.     IF LEFT(temp,1)~='N' THEN
  183.       DO
  184.         ADDRESS AREXX bbsArcExt.rexx name selected
  185.         selected=''
  186.         SAY CR
  187.         IF ADDRESS()='BAUD' THEN
  188.           DO
  189.             SAY 'BBBBS will notify you online when your archive is ready.'CR
  190.             SAY CR
  191.           END
  192.       END
  193.   END
  194. IF ADDRESS()='BAUD' THEN SAY 'Returning to the BBS...'CR
  195. SAY CR
  196. EXIT selected
  197.  
  198.  
  199. checkdcd:
  200. IF ADDRESS()~='BAUD' THEN RETURN
  201. dcd
  202. IF RC~=0 THEN RETURN
  203. CALL DELAY(128)
  204. dcd
  205. IF RC=0 THEN
  206.   DO
  207.     SAY CR
  208.     SAY '*** Lost Carrier while using bbsExtDL.baud ***'CR
  209.     EXIT('')
  210.   END
  211. xmsg=GETCLIP('BBS_MESSAGE')
  212. IF xmsg~='' THEN
  213.   DO
  214.     SAY CR
  215.     SAY bak2' Message From BBBBS: 'def||CR
  216.     SAY xmsg||CR
  217.     SAY CR
  218.     CALL SETCLIP('BBS_MESSAGE')
  219.     CALL getinput(1 1 pen3'      Press RETURN 'def)
  220.   END
  221. IF POS('G',GETCLIP('BBS_COMMAND'))>0 THEN EXIT
  222. RETURN
  223.  
  224.  
  225. makepicklist:
  226. IF path='' THEN RETURN ''
  227. IF STORAGE()<100000 THEN
  228.   DO
  229.     lists.=''
  230.     lists.0=0
  231.     IF WORDS(devlist)>1 THEN
  232.       DO
  233.         lists.0=1
  234.         lists.1.0=devlist
  235.       END
  236.   END
  237. DO i=1 TO lists.0
  238.   IF path=lists.i THEN RETURN lists.i.0
  239. END
  240. cname=STRIP(RIGHT(COMPRESS(path,' ._-:/'),29))
  241. IF cname~='' & EXISTS(bbspath'Cache/'cname) THEN
  242.   DO cloop=1 TO 1
  243.     k=lists.0+1
  244.     lists.0=k
  245.     x=OPEN(f,bbspath'Cache/'cname'.','R')
  246.     IF x=0 THEN SAY bbspath'Cache/'cname'. failed to open!'CR
  247.     ELSE
  248.       DO
  249.         cpath=READLN(f)
  250.         IF cpath=path THEN lists.k=path
  251.         ELSE
  252.           DO
  253.             IF level=99 THEN
  254.               SAY path 'does not match cache path in' cname'. !'CR
  255.             CALL CLOSE(f)
  256.             lists.0=lists.0-1
  257.             LEAVE cloop
  258.           END
  259.         DO i=1
  260.           line=READLN(f)
  261.           IF EOF(f) THEN LEAVE i
  262.           IF colorflag~=1 THEN
  263.             DO
  264.               n=POS('1B'x,line)
  265.               DO WHILE n>0
  266.                 DO m=2
  267.                   IF DATATYPE(SUBSTR(line,n+m,1),'M') | (n+m+1)>LENGTH(line) THEN
  268.                     leave m
  269.                 END
  270.                 line=DELSTR(line,n,m+1)
  271.                 n=POS('1B'x,line)
  272.               END
  273.             END
  274.           lists.k.i=line
  275.         END
  276.         CALL CLOSE(f)
  277.         lists.k.ROWS=i-1
  278.       END
  279.     x=OPEN(f,bbspath'Cache/'cname,'R')
  280.     IF x=0 THEN
  281.       DO
  282.         SAY bbspath'Cache/cname failed to open!'CR
  283.         CALL CLOSE(f)
  284.         lists.0=lists.0-1
  285.         LEAVE cloop
  286.       END
  287.     ELSE
  288.       DO
  289.         plist=READCH(f,65000)
  290.         CALL CLOSE(f)
  291.         lists.k.0=plist
  292.         RETURN plist
  293.       END
  294.   END
  295. SAY 'Loading...'CR
  296. CALL FileList(path'*',filelist,'F','N')
  297. IF filelist.0>1 THEN CALL QSORT(1,filelist.0,filelist)
  298. CALL FileList(path'*',dirlist,'D','N')
  299. IF dirlist.0>1 THEN CALL QSORT(1,dirlist.0,dirlist)
  300. plist=''
  301. dirs=0
  302. longest=0
  303. DO i=1 TO filelist.0
  304.   IF WORDS(filelist.i)~=1 THEN ITERATE i
  305.   IF filelist.i='' THEN ITERATE i
  306.   IF UPPER(RIGHT(filelist.i,5))='.INFO' THEN ITERATE i
  307.   IF FIND(exclude,UPPER(path||filelist.i))>0 THEN ITERATE i
  308.   plist=STRIP(plist filelist.i)
  309.   IF LENGTH(filelist.i)>longest THEN longest=LENGTH(filelist.i)
  310. END
  311. DO i=1 TO dirlist.0
  312.   IF WORDS(dirlist.i)~=1 THEN ITERATE i
  313.   IF FIND(exclude,UPPER(path||dirlist.i))>0 THEN ITERATE i
  314.   plist=STRIP(plist dirlist.i)
  315.   IF LENGTH(dirlist.i)>longest THEN longest=LENGTH(dirlist.i)
  316.   dirs=dirs+1
  317. END
  318. cols=76%(longest+9)
  319. lists.0=lists.0+1
  320. i=lists.0
  321. lists.i=path
  322. lists.i.0=plist
  323. DROP filelist. dirlist. 
  324. RETURN plist
  325.  
  326.  
  327. pick:
  328. PARSE ARG list 
  329. CALL postuser('CD:' path)
  330. selection=''
  331. DO k=1 TO lists.0
  332.   IF path=lists.k THEN LEAVE k
  333. END
  334. IF ~DATATYPE(lists.k.ROWS,'N') THEN
  335.   DO
  336.     items=WORDS(list)
  337.     IF items<75 & dirs<25 THEN SAY 'Formatting' items 'items...'CR
  338.     ELSE SAY 'Please be patient, formatting' items 'items may take a while the first time...'CR
  339.     lists.k.ROWS=(items%cols)+((items//cols)>0)
  340.     IF cols>items THEN cols=items
  341.     IF cols<1 THEN cols=1
  342.     longest=(76%cols)-8
  343.     lists.k=path
  344.     DO j=0 TO cols-1
  345.       DO i=1 TO lists.k.ROWS
  346.         thisnum=j*lists.k.ROWS+i
  347.         IF thisnum<=items THEN
  348.           DO
  349.             thisitem=WORD(list,thisnum)
  350.             filestat=STATEF(path||thisitem)
  351.             thisitem=LEFT(thisitem,longest)' '
  352.             IF WORD(filestat,1)='DIR' THEN
  353.               lists.k.i=lists.k.i||pen3'(dir) 'thisitem||def
  354.             ELSE
  355.               DO
  356.                 bytes=WORD(filestat,2)
  357.                 IF bytes<10000 THEN 
  358.                   lists.k.i=lists.k.i||RIGHT(bytes,5) thisitem
  359.                 ELSE IF bytes>1023999 THEN 
  360.                   lists.k.i=lists.k.i||RIGHT(bytes%1024000,4)'m' thisitem
  361.                 ELSE lists.k.i=lists.k.i||RIGHT(bytes%1024,4)'k' thisitem
  362.               END
  363.           END
  364.       END
  365.     END
  366.     IF level=99 & items>24 THEN
  367.       DO
  368.         SAY items 'items,' dirs 'dirs,' lists.k.ROWS 'rows'
  369.         OPTIONS PROMPT 'FileCache' path'? (Ny) > '
  370.         PULL junk
  371.         junk=LEFT(junk,1)
  372.         IF junk='Y' THEN
  373.           DO
  374.             CALL MAKEDIR(bbspath'Cache')
  375.             cname=STRIP(RIGHT(COMPRESS(path,' ._-:/'),29))
  376.             x=OPEN(f,bbspath'Cache/'cname,'W')
  377.             IF x=0 THEN SAY 'Unable to open cache file' cname'!'CR
  378.             ELSE
  379.               DO
  380.                 CALL WRITECH(f,list)
  381.                 CALL CLOSE(f)
  382.               END
  383.             x=OPEN(f,bbspath'Cache/'cname'.','W')
  384.             IF x=0 THEN
  385.               DO
  386.                 SAY 'Unable to open cache file' cname'. !'CR
  387.                 CALL DELETE(bbspath'Cache/'cname)
  388.               END
  389.             ELSE
  390.               DO
  391.                 CALL WRITELN(f,path)
  392.                 DO i=1 TO lists.k.ROWS
  393.                   CALL WRITELN(f,TRIM(lists.k.i))
  394.                 END
  395.                 CALL CLOSE(f)
  396.                 SAY path 'has been cached.'CR
  397.               END
  398.           END
  399.       END
  400.   END
  401. IF selected~='' THEN
  402.   DO
  403.     SAY CR
  404.     w=WORDS(selected)
  405.     temp=pen3' 'w def'selected files.'
  406.     IF shosel~=1 THEN
  407.       DO
  408.         SAY pen3'selected:'def||CR
  409.         DO i=1 TO w
  410.           SAY WORD(selected,i)||CR
  411.         END
  412.       END
  413.     ELSE temp='Enter' pen3'SHOW S'def'elected to display'temp
  414.     SAY temp||CR
  415.     IF w>5 THEN shosel=1
  416.   END
  417. SAY CR
  418. SAY 'current path ='pen3 path||def||CR
  419. SAY LEFT('-',75,'-')||CR
  420. OPTIONS PROMPT ' - ['pen3'N'def']on-stop  ['pen3'Q'def']uit  ['pen3'RETURN'def']=Continue - '
  421. DO i=1 TO lists.k.ROWS
  422.   SAY TRIM(lists.k.i)||CR
  423.   IF (i+2)//(linesperpage-1)=0 & nonstop~=1 THEN
  424.     DO
  425.       CALL whodat()
  426.       PULL junk
  427.       IF LEFT(UPPER(junk),1)='Q' THEN LEAVE i
  428.       IF LEFT(UPPER(junk),1)='N' THEN nonstop=1
  429.       IF colorflag=1 THEN SAY '1B'x'M'||LEFT('',75)||'1B'x'M'||CR
  430.     END
  431. END
  432. nonstop=0
  433. SAY LEFT('-',75,'-')||CR
  434. CALL whodat()
  435. readflag=0
  436. DO getloop=1
  437.   pstring=showtime()'   Enter ''?'' for HELP > '
  438.   OPTIONS PROMPT pstring
  439.   PARSE PULL selection 
  440.   IF selection='?' THEN
  441.     DO
  442.       CALL help()
  443.       OPTIONS PROMPT 'Press RETURN'
  444.       PULL junk
  445.       selection=';-)'
  446.       LEAVE getloop
  447.     END
  448.   IF LEFT(selection,1)='/' THEN selection=STRIP(SUBSTR(selection,2))
  449.   IF WORDS(selection)>1 THEN
  450.     DO
  451.       IF LEFT(UPPER(selection),6)='SHOW S' THEN
  452.         DO
  453.           shosel=''
  454.           selection=';-)'
  455.           LEAVE getloop
  456.         END
  457.       IF UPPER(selection)='SELECT ALL' THEN
  458.         DO
  459.           IF path='' | RIGHT(path,1)=':' | POS(UPPER(path),UPPER(devlist))>0 THEN
  460.             DO
  461.               SAY CR
  462.               SAY pen3'*** Archiving entire devices at one time is NOT allowed! ***'def||CR
  463.               SAY CR
  464.               ITERATE getloop
  465.             END
  466.           CALL selall(path)
  467.           shosel=''
  468.           selection=':-)'
  469.           LEAVE getloop
  470.         END
  471.       ELSE IF UPPER(WORD(selection,1))='READ' THEN
  472.         DO
  473.           readflag=1
  474.           selection=STRIP(DELWORD(selection,1,1))
  475.         END
  476.       ELSE IF UPPER(WORD(selection,1))='CD' THEN selection=SUBSTR(selection,4)
  477.       ELSE IF UPPER(WORD(selection,1))='DIR' THEN selection=SUBSTR(selection,5)
  478.     END
  479.   i=FIND('DONE' UPPER(list),UPPER(selection))
  480.   IF i=0 THEN
  481.     DO
  482.       i=FIND('DONE' UPPER(list),UPPER(selection':'))
  483.       IF i=0 THEN
  484.         DO
  485.           IF UPPER(selection)='KINGFISHER' THEN
  486.             DO
  487.               IF EXISTS('rexx:KingFisher.rexx') THEN
  488.                 CALL KingFisher.rexx(name '. .' colorflag maxtime)
  489.               ELSE IF EXISTS(bbspath'rexxDoors/KingFisher.rexx') THEN
  490.                 DO
  491.                   curdir=PRAGMA('D',bbspath'rexxDoors')
  492.                   CALL KingFisher.rexx(name '. .' colorflag maxtime)
  493.                   curdir=PRAGMA('D',curdir)
  494.                 END
  495.               ELSE SAY 'KingFisher.rexx not found!'CR
  496.               ITERATE getloop
  497.             END
  498.           ELSE IF UPPER(selection)='Q' THEN selection='DONE'
  499.           ELSE ITERATE getloop
  500.         END
  501.       ELSE selection=selection':'
  502.     END
  503.   IF selection='' & path='' THEN ITERATE getloop
  504.   ELSE IF i>1 THEN selection=WORD(list,i-1)
  505.   IF readflag=1 THEN
  506.     DO
  507.       endtest=UPPER(RIGHT(selection,4))
  508.       IF FIND('.ARC .DMS .LZH .LHA .ZIP .ZOO',endtest)>0 THEN
  509.         DO
  510.           CALL Contents.rexx(path||selection)
  511.           IF EXISTS('RAM:CONTENTS') THEN CALL showtext('RAM: CONTENTS')
  512.         END
  513.       ELSE CALL showtext(path selection)
  514.       readflag=0
  515.       selection=';-)'
  516.     END
  517.   LEAVE getloop
  518. END
  519. RETURN selection
  520.  
  521.  
  522. selall: PROCEDURE EXPOSE selected pen3 def CR
  523. PARSE ARG dir .
  524. IF FIND(exclude,UPPER(dir))>0 THEN RETURN
  525. SAY 'Processing'pen3 dir||def||CR
  526. IF RIGHT(dir,1)~='/' THEN dir=dir'/'
  527. filelist.=''
  528. CALL FileList(dir'*',filelist,'F','F')
  529. DO i=1 TO filelist.0
  530.   IF filelist.i='' THEN ITERATE i
  531.   IF FIND(UPPER(selected),UPPER(filelist.i))=0 & FIND(UPPER(selected),'22'x||UPPER(filelist.i)'22'x)=0 THEN
  532.     DO
  533.       IF WORDS(filelist.i)>1 THEN
  534.         DO
  535.           SAY 'Space(s) in filename!  Unable to archive' filelist.i'.'CR
  536.           ITERATE i
  537.         END
  538.       selected=STRIP(selected filelist.i)
  539.     END
  540.   ELSE IF FIND(UPPER(selected),'22'x||UPPER(filelist.i)'22'x)>0 THEN
  541.     selected=DELWORD(selected,FIND(UPPER(selected),'22'x||UPPER(filelist.i)'22'x),1)
  542.   ELSE selected=DELWORD(selected,FIND(UPPER(selected),UPPER(filelist.i)),1)
  543. END
  544. dirlist.=''
  545. IF FileList(dir'*',dirlist,'D','F')=0 THEN RETURN
  546. DO j=1 TO dirlist.0
  547.   CALL selall(dirlist.j)
  548. END
  549. RETURN
  550.  
  551.  
  552. showtext:
  553. PARSE ARG tpath' 'textfile 
  554. test=RIGHT(tpath,1)
  555. IF test~='' & test~=':' & test~='/' THEN tpath=tpath'/'
  556. x=OPEN(f,STRIP(tpath||textfile),'R')
  557. IF x=0 THEN RETURN
  558. test=READCH(f,64)
  559. mask=XRANGE(,'06'x)||XRANGE('0E'x,'1A'x)||XRANGE('1C'x,'1F'x)
  560. IF VERIFY(test,mask,'M')>0 THEN
  561.   DO
  562.     CALL CLOSE(f)
  563.     testloc=VERIFY(test,mask,'M')
  564.     SAY '*** not an archive or a text file! ***'CR
  565.     SAY 'Character number' testloc 'is ASCII' C2D(SUBSTR(test,testloc,1))||CR
  566.     RETURN
  567.   END
  568. CALL SEEK(f,0,'B')
  569. OPTIONS PROMPT ' - ['pen3'N'def']on-stop  ['pen3'Q'def']uit  ['pen3'RETURN'def']=Continue - '
  570. SAY CR
  571. SAY '-' tpath||textfile '-'CR
  572. DO i=1 WHILE ~EOF(f)
  573.   SAY COMPRESS(READLN(f),CR||'0C'x)||CR
  574.   IF i//(linesperpage-1)=0 & nonstop~=1 THEN
  575.     DO
  576.       CALL whodat()
  577.       PULL junk
  578.       IF LEFT(UPPER(junk),1)='Q' THEN LEAVE i
  579.       IF LEFT(UPPER(junk),1)='N' THEN nonstop=1
  580.       IF colorflag=1 | ADDRESS()~='BAUD'THEN
  581.         SAY '1B'x'M'||LEFT('',60)||'1B'x'M'||CR
  582.     END
  583. END
  584. CALL CLOSE(f)
  585. IF i//(linesperpage-1)>1 THEN
  586.   DO
  587.     OPTIONS PROMPT ' - ['pen3'RETURN'def']=Continue - '
  588.     PULL junk
  589.   END
  590. nonstop=0
  591. RETURN
  592.  
  593.  
  594. whodat:
  595. IF ADDRESS()~='BAUD' THEN RETURN
  596. MSG RIGHT(' ',66-LENGTH(name)) '1B'x'M'||''||''||' 'name' level 'level' '||''
  597. CALL checkdcd()
  598. RETURN
  599.  
  600.  
  601. help:
  602. SAY CR
  603. SAY CR
  604. SAY pen3'- HELP -'def
  605. SAY CR
  606. SAY 'You can navigate through directory levels using the following commands.'CR
  607. SAY 'Remember that the name must appear in the display before you can select it.'CR
  608. SAY 'Filenames are displayed with their filesizes on the left, and directories'CR
  609. SAY 'will have a' pen3'(dir)'def' on their left.'CR
  610. SAY CR
  611. SAY 'To select an item from the displayed list, enter its name as displayed.'CR
  612. SAY 'If the selected item is a' pen3'directory'def', its contents will be displayed.'CR
  613. SAY 'If the selected item is a file, it is added to the ''selected'' list.'CR
  614. SAY 'To remove a selected file from the list, enter its name again.'CR
  615. SAY CR
  616. SAY 'To display the parent directory, enter an ''empty'' RETURN'CR
  617. SAY 'To read a textfile or see the contents of an archive, enter' pen3'READ'def 'filename.'CR
  618. SAY 'To select ALL items from the current display, including the contents of all'CR
  619. SAY 'displayed directories and their sub-directories, enter 'pen3'SELECT ALL'def'.'CR
  620. SAY CR
  621. IF EXISTS('rexx:KingFisher.rexx') | EXISTS(bbspath'rexxDoors/KingFisher.rexx') THEN
  622.   SAY 'Enter 'pen3'KINGFISHER'def' to use the online search utility.'CR
  623. SAY CR
  624. SAY 'Enter'pen3 'DONE' def'to return to the BBS (and download any selected files)'CR
  625. SAY CR
  626. RETURN
  627.  
  628.  
  629. postuser:
  630. IF ADDRESS()~='BAUD' | ~SHOW('P','BBSPOST') THEN RETURN
  631. PARSE ARG parg 
  632. ptext=GETCLIP('BBSPOST4')
  633. IF WORDS(ptext)>4 THEN ptext=LEFT(ptext,WORDINDEX(ptext,5)-1)
  634. ptext=STRIP(ptext)
  635. ptext=CENTER(ptext'   'parg,74)
  636. CALL SETCLIP('BBSPOST4',ptext)
  637. ADDRESS BBSPOST 'UPDATE'
  638. RETURN
  639.  
  640.  
  641. showtime:
  642. mins=(maxtime-TIME('E'))%60
  643. secs=TRUNC((maxtime-TIME('E'))//60)
  644. IF secs<10 THEN secs='0'secs
  645. RETURN 'Time Remaining: 'mins':'secs
  646.  
  647.  
  648. BREAK_E:
  649. SAY CR
  650. SAY pen3'*** CONTROL-E BREAK ***'def||CR
  651. i=999999
  652. RETURN ''
  653.  
  654.  
  655. BREAK_C:
  656. SAY CR
  657. EXIT ''
  658.  
  659. /* bbsExtDL.baud */
  660.